<?php
if (!defined("BASEPATH")) exit("No direct script access allowed");

class Mapping_model extends MY_Model {

	function __construct() {
		parent::__construct();
		$this->tableName = "mapping";
		$this->prefix = "map";
	}

	function searchMappedElement($where) {
		$qs =	"
				select
					map_group_name
				from
					mapping
				where
					".$where." and map_del = 0
				group by
					map_group_name
				order by
					map_group_name
				";
		$result = $this->db->query($qs);
		//Common::pr($this->db->last_query()); exit;
		if($result->num_rows()) {
			return ($result->result_array());
		}
		return array();
	}
	
}